<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<!--	<bean id="dataSource"-->
<!--		class="com.mchange.v2.c3p0.ComboPooledDataSource"-->
<!--		destroy-method="close">-->
<!--		<property name="driverClass" value="com.mysql.jdbc.Driver" />-->
<!--		<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/hibernatefacedetector" />-->
<!--		<property name="user" value="root" />-->
<!--		<property name="password" value="" />-->
<!--		<property name="minPoolSize" value="2" />-->
<!--      	<property name="maxPoolSize" value="4" />-->
<!--	</bean>-->
	
	<bean id="hibernateSessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
<!--		<property name="configLocation" value="classpath:hibernate.cfg.xml"/>-->
		<property name="annotatedClasses">
			<list>
				<value>pms.om.User</value>
				<value>pms.om.Room</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
			</props>
		</property>
	</bean>
	
	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
	<!-- ******************* -->
	<!-- Data Access Objekte -->
	<!-- ******************* -->
	
	<bean id="UserDao" class="pms.dao.UserDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
	<bean id="RoomDao" class="pms.dao.RoomDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>

	<!-- ************** -->
	<!-- Die Controller -->
	<!-- ************** -->
	
	<bean name="RecognizeCo" class="pms.controller.Recognize" />
	<bean name="HomeCo" class="pms.controller.Home" />

</beans>
